#include <assert.h>
#include <ctype.h>
#include <locale.h>
#include <errno.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>


int factorial(unsigned int i)
{
    if(i <= 1)
    {
        return 1;
    }
    else
    {
        return i * factorial(i - 1);
        // return i;
    }


}

int fibonaci(unsigned int i)
{
    if ( i == 0 )
    {
        return 0;
    }
    if ( i == 1)
    {
        return 1;
    }
    return fibonaci(i-1) + fibonaci(i-2);
}

void main(void)
{
    unsigned int var;
    var = 3;
    printf("factorial(%d): %d\n", var, factorial(var));
    printf("fibonaci(%d): %d\n", var, fibonaci(var));

    system("pause");
}



/*
    void recursion()
    {
    statements;
    ... ... ...
    recursion(); // 函数调用自身
    ... ... ...
    }
    
    int main()
    {
    recursion();
    }


*/